<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->

<head>
    <include file="Public:meta"/>
</head>

<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<include file="Public:header"/>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <include file="Public:sidebar"/>
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <!-- BEGIN PAGE CONTAINER-->
        <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->
            <div class="row-fluid">
                 <!-- begin BCN -->
                <div class="row-fluid">
                    <div class="span12"><ul class="breadcrumb"><li><i class="icon-home"></i><a onfocus="blurLink(this);" href="{:U('Index/index')}">首页</a>&nbsp;<span class="icon-angle-right"></span>&nbsp;</li><li><a onfocus="blurLink(this);" href="{:U(CONTROLLER_NAME . '/index', 'kept=1')}">{$ParentPageName|default="未命名"}</a>&nbsp;<span class="icon-angle-right"></span>&nbsp;</li><li>{$PageName|default="未命名"}</li></ul></div>
                </div>
                <!-- end BCN -->
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN PAGE CONTENT-->
            <div class="row-fluid white">
                <div class="span12">
                    <!-- begin 高级搜索 -->
                    <form id="filter_form" class="form-horizontal form-common adv-search-box" method="get" action="">
                        <input name="m" type="hidden" value="{:(MODULE_NAME)}">
                        <input name="c" type="hidden" value="{:(CONTROLLER_NAME)}">
                        <input name="a" type="hidden" value="index">
                        <input name="filter" type="hidden" value="1">
                        <input name="type" type="hidden" value="{$Think.get.type}">
                        <div class="box">
                            <div class="portlet-title">
                                <div class="caption"><i class="icon-search"></i>高级搜索</div>
                                <div class="tools"><a href="javascript:;" class="collapse"></a></div>
                            </div>
                            <div class="portlet-body">
                                <div class="row-fluid">
                                    <div class="span8">
                                        <div class="control-group control-common">
                                            <label class="control-label"><span>成交时间</span></label>
                                            <div class="controls">
                                                <div class="input-append form_date date-min" data-date="2012-12-21T15:25:00Z">
                                                    <input type="text" class="m-wrap w182"  readonly="readonly" name="start" value="{$Think.get.start}" placeholder="成交开始时间" />
                                                    <span class="add-on"><i class="icon-remove"></i></span>
                                                    <span class="add-on"><i class="icon-calendar"></i></span>
                                                </div>
                                                -
                                                <div class="input-append form_date date-max" data-date="2012-12-21T15:25:00Z">
                                                    <input type="text" class="m-wrap w182"  readonly="readonly" name="end" value="{$Think.get.end}" placeholder="成交结束时间" />
                                                    <span class="add-on"><i class="icon-remove"></i></span>
                                                    <span class="add-on"><i class="icon-calendar"></i></span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="search-actions">
                                    <button class="btn blue" id="filter" type="submit">筛选<i class="icon-filter"></i></button>
                                    <a href="{:U(CONTROLLER_NAME.'/index')}" class="btn">重置</a>
                                </div>
                            </div>
                        </div>
                    </form>
                    <!-- end 高级搜索 -->

                    <!-- begin 操作与分页 -->
                    <div class="row-fluid ">
                        <div class="dataTables_length pull-left">
                            <form id="limit_form" name="limit_form" method="post" action="">
                                <label for="limit_num">
                                    <select class="limit_num" id="limit_num" name="limit_num">
                                    <volist name="page_limit_num" id="vo">
                                        <option <eq name="_SESSION['page_limit_num']" value="$vo"> selected="selected" </eq> value="{$vo}">{$vo}</option>
                                    </volist>
                                    </select>
                                    个记录/每个页面
                                </label>
                            </form>
                        </div>
                        <div class="btn-item pull-left">
                            <!-- begin 导出操作 -->
                            <if condition="checkAccess(CONTROLLER_NAME,'export')">
                                <notempty name="list">
                                    <a class="btn green export" href="javascript:void(0)">数据导出<i class="icon-plus"></i></a>
                                </notempty>
                            </if>
                            <!-- end 导出操作 -->
                        </div>
                    </div>
                    <!-- end 操作与分页 -->
                    
                    <div class="portlet-body">
                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                            <tr>
                                <th>商品id</th>
                                <th>商品名称</th>
                                <th>团购id</th>
                                <th>订单id</th>
                                <th>成交时间</th>
                                <th>实付金额</th>
                                <th>红包金额</th>
                                <th>佣金</th>
                                <th>商品成本</th>
                                <th>快递成本</th>
                                <th>利润</th>
                            </tr>
                            </thead>
                            <notempty name="list">
                                <tbody>
                                    <volist name="list" id="vo" key="k">
                                        <tr>
                                            <td>{$vo.goods_id}</td>
                                            <td>{$vo.goods_name}</td>
                                            <td>{$vo.group_id}</td>
                                            <td>{$vo.id}</td>
                                            <td>{$vo.crdate|date="Y-m-d H:i:s",###}</td>
                                            <td>{$vo.pay_price}</td>
                                            <td>{$vo.coupon_money}</td>
                                            <td>{$vo.commission}</td>
                                            <td>{$vo['cost_money'] * $vo['num']}</td>
                                            <td>{$vo.postage_money}</td>
                                            <td>{$vo['pay_price'] - $vo['cost_money'] * $vo['num'] - $vo['postage_money']}</td>
                                        </tr>
                                    </volist>
                                </tbody>
                            </notempty>
                        </table>
                    </div>
                    <div class="pages clearfix">
                        <include file="Public:page" />
                    </div>
                </div>
            </div>
            <!-- END PAGE CONTENT-->
        </div>
        <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
</div>
<!-- END CONTAINER -->
<include file="Public:footer"/>
<include file="Public:js"/>
<style type="text/css">
    .table td{
        vertical-align: middle;
    }
</style>
<script type="text/javascript">
    $(function(){
        //数据导出
        $('.export').click(function(){
            url = "{:U(CONTROLLER_NAME.'/export')}";
            window.location.href = url;
        });
    })
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>